using NL.UI;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace XGame.UI
{
    public class UIInfoNumEx : UIInfo
    {
        public int HideWhenLessThan = 1;

        protected override void _DoReset()
        {
            base._DoReset();
            int _num = 0;
            if (!int.TryParse(Value, out _num))
                return ;

            if (_num <= HideWhenLessThan && GetComponent<Text>() != null)
                GetComponent<Text>().text = "";
        }
        //public override UIInfo Reset()
        //{
        //     base.Reset();


        //    //gameObject.SetActive(_num > HideWhenLessThan);

        //    return this;
        //}

        protected new void RequestInfoReset()
        {
            Reset();
        }
    }
}

